package com.lineage.data.item_etcitem.extra;

import com.lineage.data.executor.ItemExecutor;
import com.lineage.server.model.Instance.L1ItemInstance;
import com.lineage.server.model.Instance.L1PcInstance;
import com.lineage.server.serverpackets.S_NPCTalkReturn;
import com.lineage.server.serverpackets.S_ServerMessage;
import com.lineage.server.serverpackets.ServerBasePacket;

public class EarringsExpansionGem extends ItemExecutor {
  public static ItemExecutor get() {
    return new EarringsExpansionGem();
  }
  
  public void execute(int[] data, L1PcInstance pc, L1ItemInstance item) {
    if (pc.getQuest().get_step(58001) == 1) {
      pc.sendPackets((ServerBasePacket)new S_ServerMessage("无法再扩充耳环栏位。"));
      return;
    } 
    pc.getInventory().removeItem(item, 1L);
    pc.getQuest().set_step(58001, 1);
    pc.sendPackets((ServerBasePacket)new S_NPCTalkReturn(pc.getId(), "slot9"));
  }
}
